package com.cloud.server.user.controller;

import com.cloud.core.common.BaseDto;
import com.cloud.core.param.server.req.UserReq;
import com.cloud.server.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.SQLException;

/**
 * Created by cloudy.xie on 17/12/13.
 */
@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @Async
    @RequestMapping("/ads/getList")
    public BaseDto getList(UserReq userReq) throws SQLException {
        return BaseDto.ok(userService.login(userReq));
    }


}